import request from '@/utils/request'
const api_name = '/admin/core/integralGrade'

export default {
    // 查询所有的积分详情
    getAll(){
        return request({
            url: `${api_name}`,
            method: 'GET'
        })
    },
    // 查询带分页的积分等级信息
    getPageList(pageNum,pageSize){
        return request({
            url: `${api_name}/${pageNum}/${pageSize}`,
            method: 'GET',
        })
    },
    // 根据id查询积分信息
    getById(id){
        return request({
            url: `${api_name}/${id}`,
            method: 'GET'
        })
    },
    // 保存积分信息
    insert(obj){
        return request({
            url: `${api_name}`,
            method: 'POST',
            data: obj
        })
    },
    // 修改积分信息
    update(obj){
        return request({
            url: `${api_name}`,
            method: 'PUT',
            data: obj
        })
    },
    // 根据id删除积分信息
    removeById(id){
        return request({
            url: `${api_name}/${id}`,
            method: 'DELETE'
        })
    },
    //根据id批量删除积分信息
    removeByIds(idList){
        return request({
            url: `${api_name}`,
            method: 'DELETE',
            data: idList
        })
    }
}